Skip to content

fix: Upgrade jsonschema from <4.18.0 to >=4.18.0#1217

Merged
nathan-stender merged 2 commits into
mainfrom
upgrade-jsonschema-4.18
Jun 2, 2026
Merged

fix: Upgrade jsonschema from <4.18.0 to >=4.18.0#1217
nathan-stender merged 2 commits into
mainfrom
upgrade-jsonschema-4.18

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

  • Removes the < 4.18.0 version pin on jsonschema that was added 2 years ago due to a performance regression in the referencing library (issue fix: Fix Quantstudio well calculated documents  #178)
  • Migrates from deprecated jsonschema.RefResolver API to referencing.Registry API
  • Handles bundled sub-schemas correctly: technique schemas that bundle extended copies of shared schemas (with additional enum values) are prioritized over standalone versions by comparing content size

Context

The performance regression has been resolved upstream. Benchmarking confirmed jsonschema 4.26.0 performs equally or better than the pinned 4.17.3 for both cold-start and large-file validation scenarios.

Test plan

  • All 1439 tests pass (only pre-existing test_table_contents failure unrelated to this change)
  • Biacore tests pass (previously failing due to bundled units.schema missing nM)
  • Flow-cytometry tests pass (bundled core.schema with extended enums correctly prioritized)
  • Gen5 image tests pass
  • Mypy and ruff pass cleanly

🤖 Generated with Claude Code

The performance regression that caused the original pin (filed as
referencing#178) has been resolved in newer versions. Migrate from
the deprecated jsonschema.RefResolver API to the referencing.Registry
API. Bundled sub-schemas with extended enums are correctly prioritized
over standalone versions by comparing content size.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners June 2, 2026 15:29
@nathan-stender
nathan-stender requested a review from tamargrey June 2, 2026 15:29
A single validation triggers 40,000+ $ref resolutions with only ~17
unique URIs. Cache resolved schemas by (base_uri, ref) to avoid
repeated URL parsing and pointer navigation. Brings performance to
parity with jsonschema 4.17.3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender merged commit d21b6d9 into main Jun 2, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the upgrade-jsonschema-4.18 branch June 2, 2026 16:08
nathan-stender added a commit that referenced this pull request Jun 2, 2026
### Fixed

- Upgrade jsonschema from <4.18.0 to >=4.18.0 (#1217)
nathan-stender added a commit that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants